#include<iostream>
using namespace std;

void main()
{
	

	for(int i=1; i<=10; i++)
	{
		int total=1;

		for(int j=1; j<=i; j++)
		{
			total *= j;
			
		}
		cout<<" "<<i<<"! = "<<total<<endl;
	}
}